using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class ATL_LogMap : EntityTypeConfiguration<ATL_Log>
    {
        public ATL_LogMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.Action)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.RecordCode)
                .HasMaxLength(20);

            this.Property(t => t.RecordNb)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("ATL_Log");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.User).HasColumnName("User");
            this.Property(t => t.Date).HasColumnName("Date");
            this.Property(t => t.Action).HasColumnName("Action");
            this.Property(t => t.RecordCode).HasColumnName("RecordCode");
            this.Property(t => t.RecordNb).HasColumnName("RecordNb");
        }
    }
}
